package com.svms.data;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

import com.svms.service.vo.SpareCodesVO;

public class SpareCodeData {

	public static List<SpareCodesVO> getAllSpareCodes() {

		List<SpareCodesVO> spareCodesVOs = new ArrayList<SpareCodesVO>();
		Random randomGenerator = new Random();

		for (int i = 100; i < 120; i++) {

			SpareCodesVO codesVO = new SpareCodesVO();
			
			codesVO.setSpareId(String.valueOf(i));
			codesVO.setSpareName("SPARE_" + randomGenerator.nextInt(99) + "_"
					+ randomGenerator.nextInt(99));
			codesVO.setMaxDays("100");
			codesVO.setCutOffDays("80");
			codesVO.setMaxDistance("200");
			codesVO.setCutOffDistance("180");
			codesVO.setValidationFormat(randomGenerator.nextInt(100) % 2 == 0 ? "DIS"
					: "DAY");
			spareCodesVOs.add(codesVO);
		}

		return spareCodesVOs;

	}
}
